gusucode.com > 支持向量机工具箱 - LIBSVM OSU_SVM LS_SVM源码程序 > 支持向量机工具箱 - LIBSVM OSU_SVM LS_SVM\stprtool\svm\smoker.m
% SMOKER Sequential Minimal Optimization for SVM (L1). % [Alpha,bias,nsv,trn_err,margin]=smoker(K,labels,C,eps,tol,Alpha,bias) % % SMOKER is the SMO which uses precomputed kernel matrix % insted of kernel function evaluations in each step. % It is faster but needs more memory compared to smo.c. % % To make executable file run 'mex smoker.c'. % % Obligatory input: % K [NxN] kernel matrix for N training patterns. % labels [1xN] labels of training patterns (1 - 1st, 2 - 2nd class ). % C [real] or [2 x real] one trade-off constant for both the classes % or two constants for the first and the second class. % % Optional input: % eps [real] tolerance of KKT-conditions fulfilment (default 0.001). % tol [real] minimal change of optimized Lagrangeians (default 0.001). % Alpha [1xN] initial values of optimized Lagrangeians. If not given % then SMO starts from Alpha = zeros(1,N). % bias [real] initial value of the threshold. If not given then SMO % starts from bias = 0. % % Mandatory outputs: % Alpha [1 x N] found Lagrangeian multipliers. % bias [real] found bias. % % Optional outputs: % nsv [real] number of Support Vectors (number of Alpha > ZERO_LIM). % trn_err [real] classification error on the training data. % margin [real] margin between classes and the found hyperplane. % % See also SMO, SVMCLASS, SVM. % % Statistical Pattern Recognition Toolbox, Vojtech Franc, Vaclav Hlavac % (c) Czech Technical University Prague, http://cmp.felk.cvut.cz. % % Modifications % 1-Nov-2001, V.Franc % 21-Oct-2001, V.Franc % 16-October-2001, V.Franc % 30-September-2001, V.Franc, comments. % 26-September-2001, V. Franc, created